#include <iostream>
#include "product.h"
#include "factory.h"

using namespace std;

int main(int argc, char const *argv[])
{
    AbstractFactory *fac = new Factory(); // 创建简单工厂类
    AbstractProduct *p1 = fac->create_product(1); 
    AbstractProduct *p2 = fac->create_product(2);

    p1->operation();
    p2->operation();

    delete fac;
    delete p1;
    delete p2;
    
    return 0;
}
